package com.zts.modules.sys.entity.model;

import com.zts.base.entity.EntityModel;
import com.zts.modules.sys.entity.Code;
import com.zts.modules.sys.entity.User;
import com.zts.util.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.beans.BeanUtils;

/**
 * Created by lzk on 2017/6/16.
 */
public class CodeModel extends EntityModel<Code> {

    @ApiModelProperty(value = "类别标识")
    private String cataCode;          //类别标识
    @ApiModelProperty(value = "类别名称")
    private String cataName;
    @ApiModelProperty(value = "子类别标识")
    private String subCode;          //子类别标识
    @ApiModelProperty(value = "子类别名称")
    private String subCodeName;
    @ApiModelProperty(value = "状态")
    private String status;

    public String getCataCode() {
        return cataCode;
    }

    public void setCataCode(String cataCode) {
        this.cataCode = cataCode;
    }

    public String getCataName() {
        return cataName;
    }

    public void setCataName(String cataName) {
        this.cataName = cataName;
    }

    public String getSubCode() {
        return subCode;
    }

    public void setSubCode(String subCode) {
        this.subCode = subCode;
    }

    public String getSubCodeName() {
        return subCodeName;
    }

    public void setSubCodeName(String subCodeName) {
        this.subCodeName = subCodeName;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public Code transEntity() {
        Code code = new Code();
        String[] emptyProperties = BeanUtil.getNullPropertyNames(this);
        BeanUtils.copyProperties(this, code, emptyProperties);
        return code;
    }

    @Override
    public Code transEntity(Code entity) {
        String[] emptyProperties = BeanUtil.getNullPropertyNames(this);
        BeanUtils.copyProperties(this, entity, emptyProperties);
        return entity;
    }
}
